import { request } from "@/utils/request";
import { ILogin } from "@/types/login";
import { IUserPwd } from '@/types/global';
/**
 * 登录
 * @returns
 */
export const memberLogin= (data:ILogin) =>
    request<string>({
      method: "POST",
      url: "/member/login",
      data,
    })


/**
 * 登出
 * @returns
 */
export const memberLogout= () =>
    request<string>({
      method: "POST",
      url: "/member/logout"
    })

    
/**
 * 会员心跳
 * @returns
 */
export const memberHeartbeat= () =>
    request<string>({
      method: "POST",
      url: "/member/heartbeat"
    })


//更新用户登录密码
export const updateUserPassword = (data: IUserPwd) =>
    request<any>({
        method: 'POST',
        url: '/member/update/user/pwd',
        data
    });

//更新支付密码
export const updateCashPassword = (data: IUserPwd) =>
    request<any>({
        method: 'POST',
        url: '/member/update/cash/pwd',
        data
    });